Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of MC bending sampling #344

Merged
merged 15 commits into from
Nov 21, 2023
Merged

Implementation of MC bending sampling #344

merged 15 commits into from
Nov 21, 2023

Conversation

fgrunewald
Copy link
Member

@fgrunewald fgrunewald commented Sep 24, 2023

This code implements a local bending stiffness to the polymers. The idea is that one can set a bending constant for any triplet of residues. Subsequently, during the RW protocol the angle if a trail is accepted or rejected according to a MC-like procedure. First, the normalized probability of an angle is computed using:

$p(\theta) = \huge \frac{e^{\frac{lp \times \theta}{180}}}{\frac{180 \times e^{lp}-1}{lp}}$

This probability distribution is about equal for low values of lp and has an increased probability at higher angles with increasing lp. Note lp is a dimensionless bending constant not per se the persistence length. Once the probability is computed we check if the value is higher than the previous bending probability. If yes the move is accepted and if not we compare it to the probability of a uniform sampling of the distribution.

So far bending constant can be given as tuples of three residue names. This means local bending stiffness can be accounted for. We could therefore use it to really fine-tune the DNA parameters. However, it also means the bending term is non-symmetric which means for combinations of many different monomers this might become cumbersome. Ideally, we could set a default value for all monomers.

Points to discuss:

  • Do we want to be able to set one default value for all triplets?
  • Is there a better probability distribution?
  • Do we want to see if there is an approximate relation between lp reported and lp set?
  • Allow bending in combination with restraints? Should probably be tested?
  • do we want to add a temperature factor?

@jan-stevens let me know your thoughts.

I did some testing of this implementation and in general works quite well to reproduce the expected end-to-end distance by setting an appropriately large bending constant. Any relation to the experimental value of lp is, however, to me not obvious. Probably the estimated volume of the residue itself contributes to the stiffness to some extent so one potentially has to determine a qualitative bending constant by trail and error. For DNA, we can simply figure it out and report. The main limitation of this implementation is that the distributions are not as peaked for cases where contour-length >~ lp. In those cases the WCM distributions are probably not too good either.

@fgrunewald fgrunewald added the DNA_extension Part of the DNA extension project label Sep 24, 2023
@fgrunewald
Copy link
Member Author

some observation:

stiff polymers where contour-length >~ lp need a low number of rewind steps (e.g. setting -rw 1). For single polymers this helps to get relatively straight chain conformations.

@fgrunewald
Copy link
Member Author

summoning @pckroon for a technical code review

Copy link
Member

@pckroon pckroon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments, mostly superficial

polyply/src/gen_coords.py Outdated Show resolved Hide resolved
polyply/src/nonbond_engine.py Show resolved Hide resolved
polyply/src/nonbond_engine.py Outdated Show resolved Hide resolved
polyply/src/nonbond_engine.py Show resolved Hide resolved
polyply/src/random_walk.py Outdated Show resolved Hide resolved
polyply/src/random_walk.py Outdated Show resolved Hide resolved
polyply/src/random_walk.py Outdated Show resolved Hide resolved
polyply/src/random_walk.py Outdated Show resolved Hide resolved
polyply/tests/test_nb_engine.py Outdated Show resolved Hide resolved
polyply/tests/test_random_walk.py Outdated Show resolved Hide resolved
@fgrunewald fgrunewald requested review from pckroon and removed request for jan-stevens November 10, 2023 11:27
bin/polyply Outdated Show resolved Hide resolved
pckroon
pckroon previously approved these changes Nov 16, 2023
Copy link
Member

@pckroon pckroon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming you addressed all my previous comments

@fgrunewald fgrunewald merged commit 9690866 into master Nov 21, 2023
8 checks passed
@fgrunewald fgrunewald deleted the bending branch November 21, 2023 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNA_extension Part of the DNA extension project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants